<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <!-- Bootstrap 3.3.6 -->
  <link rel="stylesheet" href="/static/adminlte/bootstrap/css/bootstrap.min.css">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="/static/css/font-awesome.min.css">
  <!-- Ionicons -->
  <link rel="stylesheet" type="text/css" href="/static/css/ionicons.min.css" />
  <!-- Theme style -->
  <link rel="stylesheet" href="/static/adminlte/dist/css/AdminLTE.min.css">
		<title></title>
	</head>
	<body>

<section class="content">
      <div class="row">
		<div class="col-xs-12">
		          <div class="nav-tabs-custom">
		            <ul class="nav nav-tabs">
		              <li><a href="{{ route('admin.permission.index') }}">权限列表</a></li>
		              <li class="active"><a href="{{ route('admin.permission.add') }}">添加权限</a></li>
		            </ul>
		            <div class="tab-content">
						<form class="form-horizontal myform" action="{{ route('admin.permission.add') }}" method="post">
			              <div class="box-body">
			              	<div class="form-group">
			              		<label class="col-sm-2 control-label">上级菜单</label>
			              		<div class="col-sm-10">
		                            <select name="pid" class="form-control">
		                                <option value="0">一级菜单</option>
										@foreach ($list as $v)
										    <option value="{{ $v['id'] }}" {!! $v['id'] == $id ? 'selected="selected"' : '' !!}>{{ $v['html']}}{{$v['display_name']}}</option>
										@endforeach		                                
		                            </select>			              			
			              		</div>
			              	</div>
			                <div class="form-group">
			                  <label class="col-sm-2 control-label">权限名称</label>
			                  <div class="col-sm-10">
			                    <input type="text" name="display_name" class="form-control" placeholder="请输入菜单名称">
			                  </div>
			                </div>
			                <div class="form-group">
			                  <label class="col-sm-2 control-label">方法</label>
			                  <div class="col-sm-10">
			                    <input type="text" name="name" class="form-control" placeholder="请输入控制器方法 如：admin.index.index">
			                  </div>
			                </div>
			                <div class="form-group">
			                  <label class="col-sm-2 control-label">描述</label>
			                  <div class="col-sm-10">
			                    <input type="text" name="description" class="form-control" placeholder="">
			                  </div>
			                </div>			                
			                <div class="form-group">
			                	<label class="col-sm-2 control-label">图标</label>
			                	<div class="col-sm-10">
			                		<input type="text" name="icon" value="fa fa-circle-o" placeholder="（选填）如：fa fa-home" class="form-control">
			                	</div>
			                </div>
			                <div class="form-group">
			                	<label class="col-sm-2 control-label">状态</label>
			                	<div class="col-sm-10">
									<label class="radio-inline">
									  <input type="radio" name="status" value="1" checked="checked"> 显示
									</label>
									<label class="radio-inline">
									  <input type="radio" name="status" value="0"> 隐藏
									</label>				                		
			                	</div>                            
			                </div>
			                <div class="form-group">
			                	<label class="col-sm-2 control-label">排序</label>
			                	<div class="col-sm-10">
			                		<input type="text" name="sort" value="100" class="form-control">
			                	</div>
			                </div>
			                <div class="form-group">
			                	<div class="col-sm-offset-2 col-sm-10">
			                		<input type="hidden" name="_token" value="{{csrf_token()}}">
				                	<button type="submit" class="btn btn-primary">保存</button>
			                	</div>
			                </div>		                
			            </form>
		              </div>
		            </div><!-- /.tab-content -->
		          </div><!-- /.nav-tabs-custom -->
		</div><!--/.row-->
      </div>
  </section>
<!-- jQuery 2.2.3 -->
<script src="/static/adminlte/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script src="/static/layer/layer.js" type="text/javascript" charset="utf-8"></script>
<!-- Bootstrap 3.3.6 -->
<script src="/static/adminlte/bootstrap/js/bootstrap.min.js"></script>
<script src="/static/js/admin.js" type="text/javascript" charset="utf-8"></script>
	</body>
</html>
